//
//  MyRenWuTableViewCell.m
//  ShouYi
//
//  Created by yurui on 16/3/11.
//  Copyright © 2016年 yurui. All rights reserved.
//

#import "MyRenWuTableViewCell.h"

@implementation MyRenWuTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kWidth, 79)];
        backView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:backView];
        // 图片
        self.contentImageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 45, 45)];
        self.contentImageView.backgroundColor = [UIColor redColor];
        [backView addSubview:_contentImageView];
        // 进行中/已结束
        self.styleImageView = [[UIImageView alloc]initWithFrame:CGRectMake(kWidth - 60    , 10, 50, 40)];
        [backView addSubview:_styleImageView];
        
        //标题
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(60, 5, kWidth - 85, 40)];
        self.titleLabel.numberOfLines = 0;
        self.titleLabel.font = [UIFont systemFontOfSize:15];
        [backView addSubview:_titleLabel];
        
        UIView *lView = [[UIView alloc]initWithFrame:CGRectMake(0, 60, 0, 20)];
        lView.backgroundColor = [UIColor colorWithRed:248 / 255.0 green:247 / 255.0 blue:247 / 255.0 alpha:1];
        [backView addSubview:lView];
        
        // 地址标志图
        self.addressImageView = [[UIImageView alloc]initWithFrame:CGRectMake(15, 2, 15, 15)];
        // self.addressImageView.backgroundColor = [UIColor redColor];
        [lView addSubview:_addressImageView];
        //地址
        self.addressLabel = [[UILabel alloc]initWithFrame:CGRectMake(35, 2, 60, 15)];
        //self.addressLabel.backgroundColor = [UIColor blueColor];
        self.addressLabel.font = [UIFont systemFontOfSize:13];
        self.addressLabel.textColor = [UIColor colorWithRed:100 / 255.0 green:194 / 255.0 blue:190 / 255.0 alpha:1];
        [lView addSubview:_addressLabel];
        //进度
        self.jinDuLabel = [[UILabel alloc]initWithFrame:CGRectMake(100, 2, 30, 15)];
        //self.jinDuLabel.backgroundColor = [UIColor yellowColor];
        self.jinDuLabel.text = @"进度";
        self.jinDuLabel.textColor = [UIColor grayColor];
        self.jinDuLabel.font = [UIFont systemFontOfSize:13];
        [lView addSubview:_jinDuLabel];
        // 进度总数
        self.titalNumLabel = [[UILabel alloc]initWithFrame:CGRectMake(130, 2, 40, 15)];
        self.titalNumLabel.textColor = [UIColor colorWithRed:231 / 255.0 green:141 / 255.0 blue:126 / 255.0 alpha:1];
        self.titalNumLabel.textAlignment = NSTextAlignmentRight;
        //self.titalNumLabel.backgroundColor = [UIColor grayColor];
        self.titalNumLabel.font = [UIFont systemFontOfSize:13];
        [lView addSubview:_titalNumLabel];
        // 进度数
        self.jinDuNumLabel = [[UILabel alloc]initWithFrame:CGRectMake(170, 2, 60, 15)];
        self.jinDuNumLabel.textAlignment = NSTextAlignmentLeft;
        self.jinDuNumLabel.text = @"/5100";
        self.jinDuNumLabel.textColor = [UIColor blackColor];
        self.jinDuNumLabel.font = [UIFont systemFontOfSize:13];
        [lView addSubview:_jinDuNumLabel];
        //
        self.xiaXianLabel = [[UILabel alloc]initWithFrame:CGRectMake(kWidth - 100, 2, 90, 15)];
        self.xiaXianLabel.textAlignment = NSTextAlignmentRight;
        self.xiaXianLabel.text = @"03-01下线";
        self.xiaXianLabel.textColor = [UIColor grayColor];
        self.xiaXianLabel.font = [UIFont systemFontOfSize: 11];
        [lView addSubview:_xiaXianLabel];

        
    }
    return  self;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
